#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <cmath>
int isPrime(int n)
{
	for (int i = 2; i <= sqrt(n); i++)
	{
		if (n % i == 0)
			return 0;
	}
	return 1;
}
int main()
{
	int n;
	scanf("%d", &n);
	if (isPrime(n) == 1)
	{
		printf("1\n%d", n);
	}
	else
	{
		int max = 0, cons = 0, factor = 0;
		int sum = 1;
		for (int i = 2; i <= sqrt(n) + 1; i++)
		{
			if (n % i == 0)
			{
				cons++;
				sum *= i;
				if (cons > max && n % sum == 0)
				{
					max = cons;
					factor = i;
				}
				else sum = 1;
			}
			else
			{
				sum = 1;
				cons = 0;
			}
		}
		if (n > 1)
		{
			printf("%d\n", max);
			for (int i = factor - max + 1; i < factor; i++)
			{
				printf("%d*", i);
			}
			printf("%d\n", factor);
		}
	}
	return 0;
}